﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LowLevelGraphics.Filter
{
    /// <summary>
    /// imextendedmax
    /// BW = imextendedmax(I,H) computes the extended-maxima transform, which is the regional maxima of the H-maxima transform. 
    /// H is a nonnegative scalar.
    /// Regional maxima are connected components of pixels with a constant intensity value, 
    /// and whose external boundary pixels all have a lower value.
    /// By default, imextendedmax uses 8-connected neighborhoods for 2-D images and 26-connected neighborhoods for 3-D images. 
    /// For higher dimensions, imextendedmax uses conndef(ndims(I),'maximal').
    /// BW = imextendedmax(I,H,conn) computes the extended-maxima transform, 
    /// where conn specifies the connectivity. conn can have any of the following scalar values:
    /// 4, 8, 6, 18, 26
    /// </summary>
    public class ImageExtendedMaximaTransform : BaseImageFilter
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ImageExtendedMaximaTransform"/> class.
        /// </summary>
        public ImageExtendedMaximaTransform()
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ImageExtendedMaximaTransform"/> class.
        /// </summary>
        /// <param name="_imageExtendedMaximaTransform">The _image extended maxima transform.</param>
        internal ImageExtendedMaximaTransform(ImageExtendedMaximaTransform _imageExtendedMaximaTransform)
        {
        }

        /// <summary>
        /// Executes this filter
        /// </summary>
        /// <param name="_bitmap"></param>
        /// <returns></returns>
        public override UnsafeBitmap Execute(UnsafeBitmap _bitmap)
        {
            return base.Execute(_bitmap);
        }

        /// <summary>
        /// This is used to clone a filter, each filter must implement it's own clone functionality
        /// </summary>
        /// <returns></returns>
        public override object Clone()
        {
            return new ImageExtendedMaximaTransform(this);
        }
    }
}
